package com.fileDemo;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: FENGYiMing
 * @Date: 2024/04/03/16:40
 * @Description:
 */
public class FileCreate {
    public static void main(String[] args) throws IOException {
        File file = new File("e://aa/");
        if (file.mkdir()) {
            File file1 = new File(file, "aa.txt");
            file1.createNewFile();
            System.out.println("创建文件成功");
            
        }
        //File pFile = new File("e:/TankGame01");
        //File file2 = new File(pFile, "text2.txt");
        //try {
        //    file2.createNewFile();
        //} catch (IOException e) {
        //    throw new RuntimeException(e);
        //}
        //System.out.println(file.getName());

    }
}
